package com.guanjia.web;

import com.guanjia.entity.GongGao;
import com.guanjia.service.GonggaoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/information")
public class InformationController {
    @Autowired
   private GonggaoService gonggaoService;

    //关于我们
    @RequestMapping("/xinxi1")
    public String information1(){
        return "cfgj/news_list";
    }


    //帮助中心
    @RequestMapping("/xinxi2")
    public String information2(){
        return "cfgj/help";
    }


    //新手指引
    @RequestMapping("/xinxi3")
    public String information3(){
        return "cfgj/xinshou";
    }


    //联系我们
    @RequestMapping("/xinxi4")
    public String information4(){
        return "cfgj/kefu";
    }


    //合作机构
    @RequestMapping("/xinxi5")
    public String information5(){
        return "cfgj/join";
    }

    //公司简介
    @RequestMapping("/jianjie")
    public String jianjie(){return "cfgj/introduce";}

    //最新公告
    @RequestMapping("/gonggao")
    public String gonggao(Model model){
        List<GongGao> findgonggao = gonggaoService.findgonggao();
        model.addAttribute("findgonggao",findgonggao);
        return "cfgj/page";
    }

    //加入我们
    @RequestMapping("/join_us")
    public String joinus(){return "cfgj/join";}


}
